package com.leyou.sh.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leyou.sh.item.entity.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author balisong_fcs
 * @date 2020/12/27 13:38
 * @desc
 */
public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select tc.* from tb_category tc left join tb_category_brand cb on tc.id = cb.category_id where cb.brand_id = #{id}")
    List<Category> queryCategoryByBrandId(@Param("id") Long id);


}
